﻿CREATE PROCEDURE [dbo].[sp_Update_CommonSetting]
	@SmtpServer varchar(1000),
	@SystemMailAddress varchar(1000),
	@MailAddressForSummaryReport varchar(1000),
	@MailPassword varchar(1000),
	@DownloadFtp varchar(1000),
	@UploadFtp varchar(1000),
	@FtpUserName varchar(1000),
	@FtpPassword varchar(1000),
	@PrintingHouseFtp varchar(1000),
	@PrintingHouseUserName varchar(1000),
	@PrintingHousePassword varchar(1000),
	@PrintingHouseFileName varchar(1000),
	@PrivateKeyPassword varchar(1000),
	@DMRARecipient varchar(1000),
	@PrintingHouseRecipient varchar(1000),
	@FolderForDownload varchar(1000),
	@FolderForDecrypt varchar(1000),
	@FolderForDecompress varchar(1000),
	@FolderForGenerateDmraFile varchar(1000),
	@FolderForGeneratePrintingHouseFile varchar(1000),
	@FolderForCompressDmraFile varchar(1000),
	@FolderForCompressPrintingHouseFile varchar(1000),
	@FolderForEncryptDmraFile varchar(1000),
	@FolderForEncryptPrintingHouseFile varchar(1000),
	@MDForAssignBlankZip varchar(1000),
	@CurrentYear varchar(4),
	@FolderForSummaryReport varchar(1000),
	@LeadPerAgent int,
	@LockMonth int,
	@MaxStop int,
	@MinStop int
AS
	UPDATE [dbo].[CommonSetting]
   SET [SmtpServer] = @SmtpServer
      ,[SystemMailAddress] = @SystemMailAddress
      ,[MailAddressForSummaryReport] = @MailAddressForSummaryReport
      ,[MailPassword] = @MailPassword
      ,[DownloadFtp] = @DownloadFtp
      ,[UploadFtp] = @UploadFtp
      ,[FtpUserName] = @FtpUserName
      ,[FtpPassword] = @FtpPassword
      ,[PrintingHouseFtp] = @PrintingHouseFtp
      ,[PrintingHouseUserName] = @PrintingHouseUserName
      ,[PrintingHousePassword] = @PrintingHousePassword
      ,[PrintingHouseFileName] = @PrintingHouseFileName
      ,[PrivateKeyPassword] = @PrivateKeyPassword
      ,[DMRARecipient] = @DMRARecipient
      ,[PrintingHouseRecipient] = @PrintingHouseRecipient
      ,[FolderForDownload] = @FolderForDownload
      ,[FolderForDecrypt] = @FolderForDecrypt
      ,[FolderForDecompress] = @FolderForDecompress
      ,[FolderForGenerateDmraFile] = @FolderForGenerateDmraFile
      ,[FolderForGeneratePrintingHouseFile] = @FolderForGeneratePrintingHouseFile
      ,[FolderForCompressDmraFile] = @FolderForCompressDmraFile
      ,[FolderForCompressPrintingHouseFile] = @FolderForCompressPrintingHouseFile
      ,[FolderForEncryptDmraFile] = @FolderForEncryptDmraFile
      ,[FolderForEncryptPrintingHouseFile] = @FolderForEncryptPrintingHouseFile
      ,[MDForAssignBlankZip] = @MDForAssignBlankZip
      ,[CurrentYear] = @CurrentYear
      ,[FolderForSummaryReport] = @FolderForSummaryReport
      ,[LeadPerAgent] = @LeadPerAgent
	  ,[LockMonth] = @LockMonth
	  ,[MaxStop] = @MaxStop
	  ,[MinStop] = @MinStop
